home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / wsc4c21.zip / WSC4C_U.TXT < prev    next >
Text File  |  1997-06-01  |  52KB  |  1,382 lines

  1.  
  2.  
  3.  
  4.                   Windows Standard Serial Communications
  5.  
  6.                             Library for C/C++
  7.  
  8.                                  (WSC4C)
  9.  
  10.  
  11.                               USERS MANUAL
  12.  
  13.  
  14.  
  15.                                 Version 2.1
  16.  
  17.                                 June 2, 1997
  18.  
  19.  
  20.  
  21.  
  22.                      This software is provided as-is.
  23.               There are no warranties, expressed or implied.
  24.  
  25.  
  26.  
  27.  
  28.                          Copyright (C) 1996-1997
  29.                            All rights reserved
  30.  
  31.  
  32.  
  33.                        MarshallSoft Computing, Inc.
  34.                            Post Office Box 4543
  35.                            Huntsville AL 35815
  36.  
  37.                            Voice : 205-881-4630
  38.                              FAX : 205|880|0925
  39.                              BBS : 205-880-9748
  40.                            email : info@marshallsoft.com
  41.                              web : www.marshallsoft.com
  42.  
  43.                                _______
  44.                           ____|__     |                (R)
  45.                        --+       |    +-------------------
  46.                          |   ____|__  |  Association of
  47.                          |  |       |_|  Shareware
  48.                          |__|   o   |    Professionals
  49.                        --+--+   |   +---------------------
  50.                             |___|___|    MEMBER
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.      WSC4C Users Manual                                        Page 1
  61.  
  62.                             C O N T E N T S
  63.  
  64.  
  65.       Chapter                                                   Page
  66.  
  67.        1.0 Introduction................................................3
  68.            1.1 User Support............................................4
  69.            1.2 ASP Ombudsman...........................................4
  70.            1.3 Determining UART Address & IRQ Settings.................5
  71.            1.4 Installation............................................6
  72.        2.0 Library Overview............................................7
  73.            2.1 Dynamic Link Libraries..................................7
  74.            2.2 Using the Library.......................................7
  75.            2.3 Compiling Programs......................................7
  76.            2.4 Using a Makefile........................................7
  77.            2.5 Using an IDE............................................8
  78.            2.6 Compiling WSC..........................................10
  79.            2.7 Compiling Example Programs.............................10
  80.        3.0 Talking to Your Modem......................................11
  81.            3.1 Modem Standards........................................11
  82.            3.2 Flow Control...........................................12
  83.            3.3 Modem Initialization...................................13
  84.        4.0 Modem I/O..................................................14
  85.            4.1 MIO Introduction.......................................14
  86.            4.2 MIO Function Summary...................................14
  87.        5.0 XMODEM & YMODEM ...........................................13
  88.            5.1 XYDRIVER Introduction..................................15
  89.            5.2 XYDRIVER Function Summary..............................15
  90.        6.0 Problems...................................................16
  91.        7.0 Serial Communications......................................17
  92.            7.1 Communications Basics..................................17
  93.            7.2 RS232 Signals..........................................18
  94.        8.0 Example Programs...........................................19
  95.            8.1 SIMPLE.................................................19
  96.            8.2 SELFTEST...............................................19
  97.            8.3 MODEM..................................................19
  98.            8.4 TERM...................................................19
  99.            8.5 BCB_PGM................................................19
  100.        9.0 Legal Issues...............................................20
  101.            9.1 Registration...........................................21
  102.            9.2 License................................................21
  103.            9.3 Warranty...............................................21
  104.       10.0 Summary....................................................22
  105.            10.1 Revision History......................................22
  106.            10.2 WSC Function Summary..................................22
  107.            10.3 Further Reading.......................................23
  108.       11.0 Other MarshallSoft Computing Products for C/C++............23
  109.            11.1 Personal Communications Library for Windows...........23
  110.            11.2 Personal Communications Library for C/C++.............23
  111.            11.3 Libraries for Other Languages.........................23
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.      WSC4C Users Manual                                        Page 2
  121.  
  122.       1.0 Introduction
  123.  
  124.       The Windows Standard Serial Communications Library for C/C++ (WSC4C)
  125.       is an asynchronous communications dynamic link library (DLL) which
  126.       uses the standard Windows serial communications API. Since it uses
  127.       the Windows API, programs using the WSC library are fully compatible
  128.       with other Window applications which also use the Windows serial
  129.       communications API.
  130.  
  131.       Both Win16 and Win32 library DLLs are included. The Win16 DLL is used
  132.       with 16-bit applications running Windows 3.X or Windows 95, while the
  133.       Win32 DLL is used with 32-bit applications running Windows 95 or
  134.       Windows NT.
  135.  
  136.       Using WSC is very straight-forward. For example, to write "HELLO" to
  137.       the serial port COM1:
  138.  
  139.            SioReset(COM1,512,512)     /* open COM1 with 512 KB buffers */
  140.            SioPuts(COM1,"HELLO\r",6)  /* write "HELLO" to COM1 */
  141.            SioDone(COM1)              /* close COM1 */
  142.  
  143.       Five C/C++ example programs with full source code are included.
  144.       Refer to chapter 8 for more details on each of the example programs.
  145.  
  146.              SIMPLE : A simple terminal emulator.
  147.            SELFTEST : Performs COM port functionality testing.
  148.               MODEM : Same as SIMPLE but controls flow control, modem
  149.                       lines, etc.
  150.                TERM : Terminal emulator with XMODEM & YMODEM, and ANSI
  151.                       terminal emulator support.
  152.                 BCB : Borland C Builder (32-bit C++) example.
  153.  
  154.       WSC4C contains over 25 functions. All functions return a negative
  155.       number if an error condition is detected.  For more details, consult
  156.       the WSC4C Reference Manual
  157.  
  158.       WSC4C uses the same function names and arguments as PCL4W (our
  159.       Windows Communications Library that does NOT use the Windows API)
  160.       except for a few functions.
  161.  
  162.       Our goal is to provide a robust serial communications library that
  163.       that you and your customers can depend upon. Contact us if you have
  164.       any questions.
  165.  
  166.       The shareware and registered versions are identical except for two
  167.       differences: (1) the shareware version displays the "shareware"
  168.       screen, and (2) the shareware version will "time out" after 20
  169.       minutes, limiting execution to a maximum of twenty minutes each time
  170.       a program is run. Of course, the registered version does not display
  171.       the shareware screen nor time out after twenty minutes.
  172.  
  173.       We apologize for the inconvenience of the shareware screen and
  174.       time-outs, but it is necessary to encourage registration by some who
  175.       would use the library (sometimes for years) without registering.
  176.  
  177.  
  178.  
  179.  
  180.      WSC4C Users Manual                                        Page 3
  181.  
  182.       1.1 User Support
  183.  
  184.       We want you to be successful in developing your applications using
  185.       WSC4C! We depend upon our customers to let us know what they need in
  186.       a communications library.  This means we are committed to providing
  187.       the best communications library that we can. If you have any
  188.       suggestions or comments, please let us know.
  189.  
  190.       If you are having a problem using WSC4C, call us at 205-881-4630
  191.       between 1:30 PM and 9:30 PM CST Monday through Friday. You can also
  192.       call at other times and leave a message, and call back later for a
  193.       reply.
  194.  
  195.       However, we can only answer questions with respect to using the WSC4C
  196.       library.  We cannot help you program your application.
  197.  
  198.       If you are on the Internet, email us at info@marshallsoft.com.  You
  199.       can also get the latest versions of our products from our anonymous
  200.       ftp site:
  201.  
  202.             FTP: ftp.marshallsoft.com      PATH: marshallsoft
  203.  
  204.       You may also call our User Support BBS (2400 to 14400 baud, no
  205.       parity, 8 data bits, 1 stop bit) at 205-880-9748 and leave a message
  206.       (address it to the SYSOP).  We will reply within 24 hours.
  207.  
  208.       The BBS is available 24 hours per day except at 2 PM Sundays for
  209.       maintenace. All files are in standard ZIP format. The BBS will
  210.       contain the latest shareware version of all MarshallSoft products as
  211.       well as related files such as:
  212.  
  213.            BUGS.ZIP:  Bug report.
  214.            NEWS.ZIP:  Latest news regarding our products.
  215.  
  216.       The MarshallSoft Computing, Inc. newsletter "Comm Talk" is published
  217.       quarterly.  It discusses various communications problems and
  218.       solutions using WSC4C as well as related information.
  219.  
  220.       The latest copy of our newsletter can be found on our User Support
  221.       BBS (in file area "Newsletters"), our anonymous ftp site (directory
  222.       /marshallsoft) as well as our web site.
  223.  
  224.           Web site:  www.marshallsoft.com
  225.  
  226.       1.2 ASP Ombudsman
  227.  
  228.       MarshallSoft Computing, Inc.  is a member of the Association of
  229.       Shareware Professionals (ASP).  ASP wants to make sure that the
  230.       shareware principle works for you.  If you are unable to resolve a
  231.       shareware-related problem with an ASP member by contacting the member
  232.       directly, ASP may be able to help.  The ASP Ombudsman can help you
  233.       resolve a dispute or problem with an ASP member, but does not provide
  234.       technical support for members' products. Please write to the ASP
  235.       Ombudsman at 545 Grover Road, Muskegon, MI USA 49442-9427, Fax
  236.       616-788-2765, or send a CompuServe message via CompuServe Mail to ASP
  237.       Ombudsman 70007,3536.
  238.  
  239.  
  240.      WSC4C Users Manual                                        Page 4
  241.  
  242.       1.3 Determining UART Address & IRQ Settings
  243.  
  244.       You will not normally need to know the port addresses or IRQ
  245.       assignments made by Windows. But this information is maintained by
  246.       Windows and is available if you need it.
  247.  
  248.       Both Windows 3.X and Windows 95 maintain a list of serial port
  249.       settings.  On Windows 3.X systems, choose the "Ports" icon in the
  250.       "Control Panel" in the "Main Group".  Select "Settings" and then
  251.       "Advanced" to view the COM port UART address and IRQ settings.
  252.  
  253.       In Windows 95, choose "My Computer" icon ("or whatever your computer
  254.       icon is named), select the "Control Panel" folder and then the
  255.       "System" icon.  Click on the "Device Manager" tab.  Click "Computer"
  256.       and then click "Properties". Click the "View Resources" tab.  To view
  257.       reserved resources, click the resource type at the top of the dialog
  258.       box (i.e., "Interrupt request (IRQ)" or "Input/output (I/O)" ).
  259.  
  260.       The four standard COM ports which Windows typically controls are:
  261.  
  262.             Port  Address  IRQ
  263.             COM1   0x3F8    4
  264.             COM2   0x2F8    3
  265.             COM3   0x3E8    4
  266.             COM4   0x2E8    3
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.      WSC4C Users Manual                                        Page 5
  301.  
  302.       1.4 Installation
  303.  
  304.       (1) Before installation of WSC4C, your Windows C/C++ compiler should
  305.       already be installed on your system and tested.  Examine the file
  306.       "FILES.LST" for a list of the distribution files.
  307.  
  308.       (2) Make a backup copy of your distribution disk.  Put your original
  309.       distribution disk in a safe place.
  310.  
  311.       (3) Exit Windows into DOS, or start a DOS window:
  312.  
  313.       (4) Create your WSC project directory, copy the WSC archive, then
  314.       unzip the archive. For example:
  315.  
  316.                 MKDIR   WSC
  317.                 PKUNZIP WSC4C21.ZIP WSC
  318.  
  319.       (5) Use the provided install batch file (INSTALL) to install the
  320.       library. The format is:
  321.  
  322.                 INSTALL <compiler>
  323.  
  324.       where <compiler> must be "MS" for Microsoft,  "BC"  for  Borland,  or
  325.       "WC" for Watcom. INSTALL performs the following copy operations:
  326.  
  327.       Microsoft:
  328.         COPY WSC32M.LIB WSC32.LIB
  329.         COPY WSC32M.DLL WSC32.DLL
  330.         COPY MIO32M.LIB MIO32.LIB
  331.         COPY MIO32M.DLL MIO32.DLL
  332.         COPY XYDRIV3M.LIB XYDRIV32.LIB
  333.         COPY XYDRIV3M.DLL XYDRIV32.DLL
  334.  
  335.       Borland:
  336.         COPY WSC32B.LIB WSC32.LIB
  337.         COPY WSC32B.DLL WSC32.DLL
  338.         COPY MIO32B.LIB MIO32.LIB
  339.         COPY MIO32B.DLL MIO32.DLL
  340.         COPY XYDRIV3B.LIB XYDRIV32.LIB
  341.         COPY XYDRIV3B.DLL XYDRIV32.DLL
  342.  
  343.  
  344.       Watcom:
  345.         COPY WSC32W.LIB WSC32.LIB
  346.         COPY WSC32W.DLL WSC32.DLL
  347.         COPY MIO32W.LIB MIO32.LIB
  348.         COPY MIO32W.DLL MIO32.DLL
  349.         COPY XYDRIV3W.LIB XYDRIV32.LIB
  350.         COPY XYDRIV3W.DLL XYDRIV32.DLL
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.      WSC4C Users Manual                                        Page 6
  361.  
  362.       2.0 Library Overview
  363.  
  364.       2.1 Dynamic Link Libraries
  365.  
  366.       WSC4C includes both Win16 [WSC16] and a Win32 [WSC32] dynamic link
  367.       library (DLL). A DLL is characterized by the fact that it need not be
  368.       loaded until required by an application program and that only one
  369.       copy of the DLL is necessary regardless of the number of application
  370.       programs that use it. Contrast this to the traditional static library
  371.       which is bound to each and every application that uses it at link
  372.       time.
  373.  
  374.       Since WSC4C is a DLL, only one copy of the WSC4C code and data is
  375.       loaded into memory regardless of the number of applications programs
  376.       that use it. For example, more than one instance of the test program
  377.       SIMPLE can be started.  All copies of SIMPLE can run concurrently as
  378.       long as each uses a different COM port.
  379.  
  380.       2.2 Using the Library
  381.  
  382.       The WSC4C has been tested on a Gateway 2000 (25 MHz 80386-DX, Windows
  383.       3.1), a Gateway 2000 (66 MHz 80486-DX2, Windows 3.1), a Mid-West
  384.       Micro (150 MHz Pentium, Windows 95), and a Toshiba Satellite (100 MHz
  385.       Pentium, Windows 95).
  386.  
  387.       WSC4C has also been tested with Microsoft C/C++ 7.0 (from the
  388.       Windows SDK), Microsoft Visual C/C++, Borland C/C++ (including C
  389.       Builder), Turbo C/C++, and Watcom C/C++.
  390.  
  391.       Please examine the WSC.H file. Note that COM1 is defined as port
  392.       zero, not port one.  The user must assume the responsibility for
  393.       passing the correct information when calling WSC4C functions.
  394.  
  395.       We recommend that you experiment with the example programs.
  396.  
  397.       2.3 Compiling Programs
  398.  
  399.       The example programs can be compiled by using either the provided
  400.       makefiles or creating a project file for the IDE. Separate makefiles
  401.       are provide for Win16 and Win32.
  402.  
  403.       2.4 Using a MAKEFILE
  404.  
  405.       Makefiles originated on UNIX systems. They are the standard way that
  406.       C/C++ programs are constructed in command line environments. Windows
  407.       programs can be constructed with makefiles running DOS using command
  408.       line Windows compilers.
  409.  
  410.       Makefiles are provided for Microsoft, Borland, and WATCOM command
  411.       line compilers. Makefiles have file extensions of "_M_" for
  412.       Microsoft, "_B_" for Borland, and "_W_" for WATCOM. Thus,
  413.       SIMPLE16._W_ is the Watcom Win16 makefile for SIMPLE and SIMPLE32._M_
  414.       is the Microsoft Win32 makefile.
  415.  
  416.       Turbo C/C++ for Windows and Borland C Builder do not support command
  417.       line makefiles.
  418.  
  419.  
  420.      WSC4C Users Manual                                        Page 7
  421.  
  422.       2.5 Using an IDE
  423.  
  424.       All windows compilers have an Integrated Development Environment
  425.       (IDE) for building application programs in the Windows environment.
  426.       Since there is no standard format for IDE project files, file names
  427.       must be entered into the IDE from the keyboard.  Each example program
  428.       has a project text file (e.g. SIMPLE.PRJ) which contains the list of
  429.       filenames that must be entered into the IDE.
  430.  
  431.       We do not distribute IDE files in our package because (1) they are
  432.       very large, (2) they are not always upwardly compatible with previous
  433.       versions of a particular IDE, (3) there is no standard project file
  434.       format between compiler manufactures, and (4) they often must be
  435.       modified to provide the correct path names.
  436.  
  437.       However, creating a project file within the IDE is very easy. Each
  438.       application has a project file (SIMPLE.PRJ, TERM.PRJ, SELFTEST.PRJ,
  439.       MODEM.PRJ). Each project file contains the filenames that must be
  440.       entered into the IDE.
  441.  
  442.       For each IDE, you will have to enter these filenames into the IDE.
  443.       This is usually done with the INS key except for the Microsoft
  444.       Developer, which uses menu commands. Be careful to enter all
  445.       filenames as listed in the ".PRJ" file.
  446.  
  447.       All of the example application programs have been built using IDEs
  448.       from Microsoft, Borland, and Watcom. However, there are differences
  449.       between IDE version from the same compiler manufacturer.
  450.  
  451.       All of the IDEs use the concept of a file hierarchy. For example, the
  452.       SIMPLE file hierarchy in the IDE should look like:
  453.  
  454.          SIMPLE.EXE
  455.          +++ WSC16.LIB
  456.          +++ ABOUT.C
  457.          +++ LINE.C
  458.          +++ PAINT.C
  459.          +++ SIMPLE.C
  460.          +++ SIOERROR.C
  461.          +++ SIMPLE.DEF
  462.          +++ SIMPLE.RC
  463.  
  464.       Replace WSC16.LIB above with WSC32.LIB for 32 bit applications. The
  465.       order of the files is not significant.
  466.  
  467.       2.5.1 Microsoft IDE
  468.  
  469.       Choose "Project", then "New". Select Win16 [Win32] as the target. A
  470.       dialog box will then pop up into which the project file names are
  471.       entered.
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.      WSC4C Users Manual                                        Page 8
  481.  
  482.       2.5.2 Microsoft Developer
  483.  
  484.       Choose "File", then "New", then "Project Workspace". Select
  485.       "Application" for "Type:" and your project name for "Name:". Choose
  486.       Win16 or Win32 for platform. Then select "Create".
  487.  
  488.       Select "Insert", then "Files into Project". Add all filenames as
  489.       listed in the ".PRJ" file corresponding to the project you are
  490.       building. Lastly, select "Rebuild All".
  491.  
  492.       2.5.3 Borland IDE
  493.  
  494.       Turn off LINKER case sensitivities: Choose "Options", "Projects",
  495.       "Linker", "General". Turn off the "case sensitive link" and "case
  496.       sensitive exports and imports" boxes.
  497.  
  498.       Next, choose "Project", then "New Project". Use the INS (Insert) key
  499.       to pop up a dialog box into which the project file names are entered.
  500.  
  501.       Select "GUI" for the "Target Model:" Only "Runtime" and "Dynamic"
  502.       should be checked for "Standard Libraries:"
  503.  
  504.       NOTE1: If, after linking in the IDE, you get unresolved external
  505.       references to the communications library functions in which each
  506.       function name is all upper case, then you have NOT turned off case
  507.       sensitivity as described above.
  508.  
  509.       NOTE2: If you get errors compiling the windows header file
  510.       "WINDOWS.H", turn on "Borland Extensions" in "Options", "Project",
  511.       "Compiler", "Source".
  512.  
  513.       2.5.4 Turbo C IDE
  514.  
  515.       Follow the same directions as above, except that the "Target Model:"
  516.       can be any listed.
  517.  
  518.       2.5.5 Borland C Builder
  519.  
  520.       Choose "File" / "Open Project" on the menu bar. Load BCB_PRJ.MAK.
  521.       Then, choose "Build All" from "Project" to create the executable.
  522.  
  523.       2.5.6 Watcom IDE
  524.  
  525.       Choose "File", then "New Project". Enter the project name and then
  526.       choose Win16 [Win32] as the target. Use the INS (Insert) key to pop
  527.       up a dialog box into which the project file names are entered.
  528.  
  529.       Select "Options" from the main window, then "C Compiler Switches",
  530.       then "10". Memory Models and Processor Switches". Check "80386 Stack
  531.       based calling [-3s]", then check "32-bit Flat model [-mf]".
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.      WSC4C Users Manual                                        Page 9
  541.  
  542.       2.6 Compiling WSC
  543.  
  544.       Precompiled DLL's are provided on disk for all the supported
  545.       libraries. Registered users can recompile WSC16.C and WSC32.C in
  546.       order to create WSC16.DLL and WSC32.DLL. Makefiles are provided for
  547.       each compiler.
  548.  
  549.       For Microsoft C, type:
  550.  
  551.           NMAKE -f WSC16._M_
  552.           NMAKE -f WSC32._M_
  553.  
  554.       For Borland C, type:
  555.  
  556.           MAKE -f WSC16._B_
  557.           MAKE -f WSC32._B_
  558.  
  559.       For Watcom C, type:
  560.  
  561.           WMAKE -f WSC16._W_
  562.           WMAKE -f WSC32._W_
  563.  
  564.       2.7 Compiling Example Programs
  565.  
  566.       There are makefiles provided for each of the example programs.
  567.       For example, to compile SIMPLE:
  568.  
  569.       For Microsoft C, type:
  570.  
  571.           NMAKE -f SIMPLE16._M_
  572.           NMAKE -f SIMPLE32._M_
  573.  
  574.       For Borland C, type:
  575.  
  576.           MAKE -f SIMPLE16._B_
  577.           MAKE -f SIMPLE32._B_
  578.  
  579.       For Watcom C, type:
  580.  
  581.           WMAKE -f SIMPLE16._W_
  582.           WMAKE -f SIMPLE32._W_
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.      WSC4C Users Manual                                        Page 10
  601.  
  602.       3.0 Talking to Your Modem
  603.  
  604.       A modem is used to extend the distance over which you may
  605.       communicate. Without a modem, your RS232 cable is limited to a
  606.       maximum of approximately 50 feet.  But with a modem, you can
  607.       communicate literally around the world.
  608.  
  609.       3.1 Modem Standards
  610.  
  611.       Two modems can communicate over a telephone line only if they are
  612.       both using the same signaling frequencies and modulation, which are
  613.       determined by the modem standards used.  Modem standards can be
  614.       divided into three sets: (1) speed, (2) data compression used, and
  615.       (3) error control.
  616.  
  617.       The Bell standards (103 & 212A) are those of AT&T.  The CCITT (The
  618.       International Consultative Committee for Telephone and Telegraph)
  619.       standards are designated as "V. ".
  620.  
  621.       Speed
  622.  
  623.            Bell 103  :   300 baud
  624.            Bell 212A :  1200 baud
  625.            V.21      :   300 baud
  626.            V.22bis   :  1200 & 2400 baud
  627.            V.32      :  4800 & 9600 baud
  628.            V.32bis   :  4800, 7200, 9600, 12000, and 14400 baud
  629.            V.34      :  to 28800 baud.
  630.  
  631.       Data Compression
  632.  
  633.            MNP 5     :  Microcom Networking Protocol (proprietary).
  634.            V.42bis   :  International data compression standard.
  635.  
  636.       Error Control
  637.  
  638.            MNP 2,3,4 :  Three level error correction (public domain).
  639.            V.42      :  International error correction standard.
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.      WSC4C Users Manual                                        Page 11
  661.  
  662.       3.2 Flow Control
  663.  
  664.       With modems using data compression, the modem to modem connection
  665.       will run at various speeds depending on the quality of the line.
  666.       The computer to modem connection will be at a fixed baud rate.
  667.       Therefore, a protocol (flow control) is necessary to synchronize the
  668.       data flow between a modem and the computer to which it is connected.
  669.       Refer to your modem manual for information on flow control protocols
  670.       supported.
  671.  
  672.       Two flow control protocols are used by most all modems which require
  673.       flow control.  Software flow control is called "XON/XOFF" (other
  674.       software flow control character pairs are defined but operate the
  675.       same as XON/XOFF) and hardware flow control is called "RTS/CTS". Most
  676.       modems which require flow control enable hardware flow control by
  677.       default.
  678.  
  679.       In XON/XOFF (software) flow control, the computer suspends
  680.       transmitting data if it receives a XOFF character (13 hex) from the
  681.       modem, and continues transmitting when it receives a XON character
  682.       (11 hex).  Similarly, the computer can signal the modem not to send
  683.       any more data by transmitting a XOFF to it, and can tell the modem to
  684.       continue transmission be sending a XON.
  685.  
  686.       In RTS/CTS (hardware) flow control, the RTS line is used by the
  687.       computer to signal the modem , while the CTS line is used by the
  688.       modem to signal the computer.  The RTS line is set OFF by the
  689.       computer to tell the modem to suspend transmission, and set to ON to
  690.       tell the modem to continue transmission.  The CTS line is set to OFF
  691.       by the modem to tell the computer to stop transmitting, and set to ON
  692.       to tell the computer to continue transmitting.
  693.  
  694.       Given the choice, always choose hardware flow control over software
  695.       flow control so that all data transmission is transparent.  If
  696.       hardware flow control is not the default (which it almost always is),
  697.       you should modify your modem initialization string to turn hardware
  698.       flow control on.
  699.  
  700.       WSC4C supports both hardware and software flow control.  Refer to the
  701.       SioFlow function in the WSC4C Reference Manual.
  702.  
  703.       NOTE: When hardware flow control is enabled (by calling SioFlow), no
  704.       serial I/O can occur until both DSR and CTS are set by the modem.
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.      WSC4C Users Manual                                        Page 12
  721.  
  722.       3.3 Modem Initialization
  723.  
  724.       If your application uses a modem (as opposed to using a null modem
  725.       cable), then you should always send an initialization string to your
  726.       modem. Communication programs such as PROCOMM and TELIX always send
  727.       such a string automatically as soon as they start up.
  728.  
  729.       The particular initialization string depends on the make of your
  730.       modem.  For most modems, the following string (followed by a carriage
  731.       return) should work:
  732.  
  733.            AT E1 S7=60 S11=60 V1 X1 Q0 S0=0
  734.  
  735.       Refer to your Modem User's Guide for a full discussion of these
  736.       commands.  A brief description is as follows:
  737.  
  738.            AT     Modem attention command.
  739.            E1     Modem will echo what you send to it.
  740.            S7=60  Wait 60 seconds for carrier and/or dial tone.
  741.            S11=60 Use 60 milliseconds for tone dialing duration & spacing.
  742.            V1     Display result code as words (not numbers).
  743.            X1     Use the extended result message (CONNECT XXXX) set.
  744.            Q0     Modem displays result codes.
  745.            S0=0   Do not answer RING.
  746.  
  747.       If your application will answer incoming calls, then set the S0
  748.       register to the ring on which to automatically answer.
  749.  
  750.       If you send the above codes by using SioPutc (as opposed to typing
  751.       them from the keyboard), then follow these guidelines:
  752.  
  753.       (1) Send an initial carriage return before the initialization string.
  754.  
  755.       (2) Pause at least 150 milliseconds after each character sent as
  756.       your modem needs the time to perform its own internal processing.
  757.       Pause a little longer if your modem is not accepting your
  758.       initialization string.
  759.  
  760.       (3) Pause one and a half seconds after sending any initialization
  761.       command such as ATZ or AT&F since your modem must do quite a bit of
  762.       processing.
  763.  
  764.       If you experience any problems in initializing your modem, you should
  765.       first reset it to factory settings by sending:
  766.  
  767.            AT&F
  768.  
  769.       NOTE: Use AT&F1 for US Robotics modems.
  770.  
  771.       Refer to the TERM program (function mioSendTo is in the file MIO.C)
  772.       for an example of sending an initialization string to a modem.
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.      WSC4C Users Manual                                        Page 13
  781.  
  782.       4.0 MODEM I/O (MIO)
  783.  
  784.       4.1 MIO Introduction
  785.  
  786.       The file MIO.H contains prototypes for using the Modem I/O DLL. These
  787.       functions ease communicating with modems using AT commands. The TERM
  788.       example has an example of using the MIO functions.
  789.  
  790.       The Windows "operating system" is what is called "cooperative
  791.       multitasking". The executing Windows task must voluntarily "give up"
  792.       control before another Windows task (or Windows itself) can execute.
  793.       The MIO functions are broken down into parts called states, and
  794.       control is returned to Windows between executing each state.
  795.  
  796.       For example:
  797.  
  798.       (1) Send the string to the MIO driver by executing:
  799.  
  800.       Code = mioSendTo(Port,100,"!ATDT1,205,880,9748")
  801.  
  802.       The '!' characters are converted to carriage returns.  The text
  803.       string is copied into the driver's data area.
  804.  
  805.       (2) Call mioDriver (typically based on a timer) until MIO_IDLE is
  806.       returned. Each time mioDriver is called, it will send another
  807.       character to the modem provided the required delay (since the
  808.       previous character was sent) has passed.  If the delay has not
  809.       passed, the driver simply returns MIO_RUNNING, but without actually
  810.       sending a character to the modem.  Once all characters have been
  811.       sent, mioDriver will return MIO_IDLE, indicating it is done and is
  812.       ready to accept another function.
  813.  
  814.       mioDriver will return MIO_RUNNING if it is still processing. Any
  815.       other return value indicates that it is still processing and the
  816.       returned value is a character from the modem that can be displayed if
  817.       wanted.
  818.  
  819.       (3) Once mioDriver returns MIO_IDLE, call mioResult to get the
  820.       result of the mioSendTo call.
  821.  
  822.       4.2 MIO Function Summary
  823.  
  824.        mioDriver : Drives the execution of mioSendTo, mioWaitFor, or
  825.                    mioQuiet once they have been started.
  826.         mioBreak : Forces the MIO driver to IDLE state.
  827.        mioSendTo : Sends a string (including control chars) to the modem.
  828.       mioWaitFor : Waits  for a particular string from the modem, passing
  829.                    all else through.
  830.         mioQuiet : Waits for continuous quiet of a specified duration.
  831.         mioBreak : Breaks further modem I/O activity.
  832.  
  833.       Refer to the WSC Reference Manual for more information.
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.      WSC4C Users Manual                                        Page 14
  841.  
  842.       5.0 XMODEM & YMODEM
  843.  
  844.       5.1 XYDRIVER Introduction
  845.  
  846.       The XMODEM & YMODEM functions are implemented in XYDRIVER as a DLL
  847.       (Dynamic Link Library), and are state driven like the Modem I/O
  848.       functions described in the previous section. The TERM program
  849.       provides an example of using XYDRIVER.
  850.  
  851.       A timer is normally set up [ SetTimer(hMainWnd,1,125,NULL) ] which in
  852.       turn calls xyDriver in the message loop in MainWndProc.
  853.  
  854.            WM_TIMER: Code = xyDriver(Port);
  855.                      ...
  856.                      break;
  857.  
  858.       Files can be sent and received using XMODEM, XMODEM/CRC, XMODEM/1K,
  859.       and YMODEM. The basic procedure used to run XMODEM or YMODEM is as
  860.       follows:
  861.  
  862.       (1) Call xyAcquire() immediately after calling SioReset().
  863.       (2) To receive a file, call xyStartRx(), then call xyDriver()
  864.           repeatedly until XY_IDLE is returned.
  865.       (3) To send a file, call xyStartTx(), then call xyDriver() repeatedly
  866.           until XY_IDLE is returned.
  867.       (4) Call xyRelease() immediately before calling SioDone().
  868.  
  869.  
  870.  
  871.       5.2 XYDRIVER Function Summary
  872.  
  873.              xyAbort : Abort driver at any time.
  874.            xyAcquire : Acquire a port.
  875.              xyDebug : Set the debug level.
  876.             xyDriver : Executes the next state or states.
  877.         xyGetMessage : Get the next debug message.
  878.       xyGetParameter : Get a driver parameter.
  879.            xyRelease : Release a port.
  880.            xyStartRx : Start a receive.
  881.            xyStartTx : Start a transmit.
  882.  
  883.       Refer to the WSC Reference Manual for more information.
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.      WSC4C Users Manual                                        Page 15
  901.  
  902.       6.0 Problems
  903.  
  904.       If you cannot get your application to run properly, first compile and
  905.       run the terminal emulator program SIMPLE provided on your
  906.       distribution disk. Test SIMPLE by connecting two computers with a
  907.       null modem cable or by commanding a Hayes AT command set compatible
  908.       modem.
  909.  
  910.       Once SIMPLE runs, compile and run the SELFTEST program.  This
  911.       program will test your serial ports' functionality.
  912.  
  913.       If your application does not run but SIMPLE and SELFTEST run
  914.       correctly, then you have most likely made a programming mistake in
  915.       your application. MarshallSoft Computing cannot debug your
  916.       application, especially over the telephone!  However, consider each
  917.       of the following when searching for an error in your application.
  918.  
  919.       1.  Have you included the file WSC.H in your application ?
  920.  
  921.       2.  Are your receive and transmit buffers large enough ? Use a buffer
  922.       size that is twice the size of the largest expected block.
  923.  
  924.       3.  Have you selected too high a baud rate? Windows can multitask
  925.       many tasks at once. You may have to lower your baud rate (or get
  926.       16550 UARTS).
  927.  
  928.       4.  Did SioReset return a zero value ?  If not, then you must call
  929.       SioReset again. See SIMPLE.C for an example.
  930.  
  931.       5.  Did you send the proper initialization string to your modem ?
  932.       Did you set DTR and RTS? (you should).
  933.  
  934.       7. Are you trying to link a 32-bit DLL to a 16-bit program (or vice
  935.       versa)? Keep Win16 & Win32 development separate.
  936.  
  937.       We recommend the following steps if you believe that you have
  938.       discovered a bug in the library: (1) Create the smallest, simplest
  939.       test program possible that demonstrates the problem.  (2) Document
  940.       your exact machine configuration and what error the test program
  941.       demonstrates.  (3) Upload the example source to our user support BBS,
  942.       email it, or mail us a disk.
  943.  
  944.       If the problem can be solved with an easy work-around, we will
  945.       publish the work-around.  If the problem requires a modification to
  946.       the library, we will make the change and make the modified library
  947.       available to our customers without charge.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.      WSC4C Users Manual                                        Page 16
  961.  
  962.       7.0 Serial Communications
  963.  
  964.       7.1 Communications Basics
  965.  
  966.       The heart of serial communications is the UART (Universal
  967.       Asynchronous Receiver Transmitter).  The IBM PC/XT/AT and
  968.       compatibles use the 8250, 16450, or the 16550 UART.  The purpose of
  969.       the UART is:
  970.  
  971.       (1) To convert bytes from the CPU (Central Processing Unit), into a
  972.       serial format by adding the necessary start, stop, and parity bits to
  973.       each byte before transmission, and to then transmit each bit at the
  974.       correct baud rate.
  975.  
  976.       (2) To convert the incoming stream (at a specified baud rate) of
  977.       serial bits into bytes by removing the start, stop, and parity bits
  978.       before being made available to the CPU.
  979.  
  980.       The UART is part of the serial interface circuitry which allows the
  981.       CPU to send and receive signals over the RS232 lines. This can be
  982.       diagrammed as follows:
  983.  
  984.                             Serial Interface
  985.                          +-------------------+
  986.                          |                   |
  987.       +-----+  Data Bus  |     +------+      |    RS232 Signals
  988.       | CPU +------------+     | UART |      +----------------*
  989.       +-----+            |     +------+      |
  990.                          |                   |
  991.                          +-------------------+
  992.  
  993.       The 8250/16450/16550 UART is capable of operating in one of two
  994.       modes, "polled" and "interrupt driven".  The serial communications
  995.       functions in the BIOS use the polled method.  In this approach, the
  996.       CPU is typically in a loop asking the UART over and over again if it
  997.       has a byte ready.  If its does, the polling code returns the byte.
  998.       But, if the next byte comes in before the polling code is executing
  999.       again, then that byte is lost.
  1000.  
  1001.       In the interrupt driven approach (used by Windows/WSC4C), when a
  1002.       byte is received by the UART, an "Interrupt Service Routine" (ISR) is
  1003.       executed immediately, suspending temporarily whatever else is
  1004.       executing. The ISR then moves the byte to a buffer so that your
  1005.       application program can later read it.
  1006.  
  1007.       Transmitted bytes are queued up awaiting transmission.  When a byte
  1008.       is moved from the UART transmitter holding register to the UART
  1009.       transmitter shift register, an interrupt is generated and the next
  1010.       byte is taken from the library transmitter buffer by the ISR and
  1011.       written to the UART holding register.
  1012.  
  1013.       Up to 16 bytes can be taken from the transmitter buffer while
  1014.       processing one transmitter interrupt if an 16550 UART is used. The
  1015.       16550 UART is strongly recommended for computers doing serial
  1016.       communications under Windows.
  1017.  
  1018.  
  1019.  
  1020.      WSC4C Users Manual                                        Page 17
  1021.  
  1022.       7.2 RS-232 Signals
  1023.  
  1024.       RS-232 is the name of the serial data interface standard used to
  1025.       connect computers to modems.  Most IBM compatible computers are built
  1026.       with at least one serial port and use either DB9 (9 pin) or DB25 (25
  1027.       pin) connectors.
  1028.  
  1029.       A summary of these pins and their function follows.  For more
  1030.       detailed information, refer to one of the many books dealing with
  1031.       RS-232 interfacing.
  1032.  
  1033.       Signal Ground Pin 7 (DB25), Pin 5 (DB9)
  1034.  
  1035.       The SG line is used as the common signal ground, and must always be
  1036.       connected.
  1037.  
  1038.       Transmit Data Pin 2 (DB25), Pin 3 (DB9)
  1039.  
  1040.       The TX line is used to carry data from the computer to the modem.
  1041.  
  1042.       Receive Data Pin 3 (DB25), Pin 2 (DB9)
  1043.  
  1044.       The RX line is used to carry data from the modem to the computer.
  1045.  
  1046.       Data Terminal Ready Pin 20 (DB25), Pin 4 (DB9)
  1047.  
  1048.       The DTR line is used by the computer to signal the modem that it is
  1049.       ready. DTR should be set high when talking to a modem.
  1050.  
  1051.       Data Set Ready Pin 6 (DB25), Pin 6 (DB9)
  1052.  
  1053.       The DSR line is used by the modem to signal the computer that it is
  1054.       ready.
  1055.  
  1056.       Request to Send Pin 4 (DB25), Pin 7 (DB9)
  1057.  
  1058.       The RTS line is used to "turn the line around" in half duplex
  1059.       modems, and for hardware flow control in most modems that require
  1060.       flow control.  RTS is controlled by the computer and read by the
  1061.       serial device (modem).
  1062.  
  1063.       Clear to Send Pin 5 (DB25), Pin 8 (DB9)
  1064.  
  1065.       The CTS line is used to "turn the line around" in half duplex
  1066.       modems, and for hardware flow control in most modems that require
  1067.       flow control.  CTS is controlled by the serial device (modem) and
  1068.       read by the computer.
  1069.  
  1070.       Data Carrier Detect Pin 8 (DB25), Pin 1 (DB9)
  1071.  
  1072.       The DCD line is used by the modem to signal the computer that a data
  1073.       carrier signal is present.
  1074.  
  1075.       Ring Indicator Pin 22 (DB25), Pin 9 (DB9)
  1076.  
  1077.       The RI line is asserted when a 'ring' occurs.
  1078.  
  1079.  
  1080.      WSC4C Users Manual                                        Page 18
  1081.  
  1082.       8.0 Example Programs
  1083.  
  1084.       8.1 SIMPLE
  1085.  
  1086.       SIMPLE is a very simple communications program using WSC4C.
  1087.       Everything that is typed on the keyboard is sent to the serial port,
  1088.       and everything incoming from the serial port is displayed on the
  1089.       screen.
  1090.  
  1091.       The easiest way to test SIMPLE is to connect to a modem.  Typing
  1092.       "AT" should result in an "OK" being displayed.
  1093.  
  1094.       8.2 SELFTEST
  1095.  
  1096.       SELFTEST performs a serial port I/O functionality test.  Either a
  1097.       pair of ports on the same computer (using a null modem cable) or a
  1098.       single port (using a loopback adapter) can be tested.
  1099.  
  1100.       Refer to LOOPBACK.TXT for an explanation of how to make a loopback
  1101.       adapter (without tools!).
  1102.  
  1103.       8.3 MODEM
  1104.  
  1105.       MODEM is similar to SELFTEST, but with enhanced capability. It can
  1106.       set flow control (hardware, software, or none), DTR line (set or
  1107.       clear), RTS line (set or clear), display the transmit & receive queue
  1108.       sizes, detect a break signal, detect changes in DSR and CTS, as well
  1109.       as check for various line errors (parity error, framing error, data
  1110.       overrun, receive queue overflow, and transmit buffer full).
  1111.  
  1112.       8.4 TERM
  1113.  
  1114.       TERM is a simple ANSI terminal emulator suitable for calling up a BBS
  1115.       (such as ours) and downloading or uploading files using XMODEM or
  1116.       YMODEM. The TERM program uses MIO.DLL for modem control commands, and
  1117.       the XYDRIVER.DLL for XMODEM & YMODEM file transfer.
  1118.  
  1119.       Selecting "Dial" from the menu bar will result in a pop-up dialog
  1120.       requesting the phone number to dial. Once entered, the number is
  1121.       dialed, and the program will wait for up to 60 seconds for the
  1122.       "CONNECT" string from the modem.  This wait can be terminated at any
  1123.       time by choosing "BREAK" on the menu bar.
  1124.  
  1125.       Once logged on, files can be uploaded or downloaded by selecting
  1126.       "Send" or "Receive" from the menu bar. To abort a file transfer,
  1127.       choose "BREAK" from the menu bar then type a series of Ctrl-X (^X)
  1128.       characters from the keyboard.
  1129.  
  1130.       TERM uses ANSI.C, which provides ANSI terminal emulator support.
  1131.  
  1132.       8.5 BCB_PGM
  1133.  
  1134.       BCB_PGM is a Borland C Builder example program similar to SIMPLE.
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.      WSC4C Users Manual                                        Page 19
  1141.  
  1142.       9.0 Legal Issues
  1143.  
  1144.       9.1 Registration
  1145.  
  1146.  
  1147.       WSC4C may be registered for $75 plus $5 S&H ($10 outside of North
  1148.       America).
  1149.  
  1150.       To order, contact us as shown on the title page of this manual. All
  1151.       prices are guaranteed for one year from the release date.
  1152.  
  1153.       Multiple copy discounts (3 or more) and site licenses are available.
  1154.       Please call for details.
  1155.  
  1156.       We  accept American Express, VISA, MasterCard, Discover, checks in US
  1157.       dollars drawn on  a  US  bank,  International  Postal  Money  Orders,
  1158.       purchase orders (POs) from recognized US schools and companies listed
  1159.       in  Dun  &  Bradstreet,  and  COD  (street  address  and phone number
  1160.       required) within the USA (plus a $5 COD charge).
  1161.  
  1162.       For credit card orders, be sure to include the account number, the
  1163.       expiration date, the exact name on the card, and the complete card
  1164.       billing address (the address to which the credit card bill is
  1165.       mailed).
  1166.  
  1167.       Print the file INVOICE.TXT if a "Pro Forma" invoice is needed.
  1168.  
  1169.       If you wish to update from an older version of WSC4C, send $25 plus
  1170.       $5 S&H ($10 S&H outside of North America).
  1171.  
  1172.       The registered package includes:
  1173.  
  1174.            o  Win16 & Win32 WSC4C Libraries w/o shareware screens.
  1175.            o  Win16 & Win32 source code for WSC, MIO, and XYDRIVER.
  1176.            o  Printed Users Manual & Reference Manual.
  1177.            o  Telephone, BBS, and email support for one year.
  1178.  
  1179.       The registered user will receive the latest version of WSC4C shipped
  1180.       by US second day priority mail (packet airmail overseas).  A 3.5"
  1181.       HD diskette is provided.
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.      WSC4C Users Manual                                        Page 20
  1201.  
  1202.       9.2 License
  1203.  
  1204.       MarshallSoft Computing, Inc. grants the registered user of WSC4C the
  1205.       right to use one copy of the WSC4C library (in object form) on a
  1206.       single computer in the development of any software product (other
  1207.       more than one computer at the same time.  The source code for the
  1208.       library (WSC16.C, WSC32.C, MIO.C, and XYDRIVER.C) is copyrighted by
  1209.       MarshallSoft Computing and may not be released in whole or in part.
  1210.       Products developed using WSC4C may be distributed without royalty.
  1211.  
  1212.       9.3 Warranty
  1213.  
  1214.       MARSHALLSOFT COMPUTING, INC.  DISCLAIMS ALL WARRANTIES RELATING TO
  1215.       THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  1216.       LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  1217.       A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND
  1218.       SPECIFICALLY DISCLAIMED. NEITHER MARSHALLSOFT COMPUTING, INC.  NOR
  1219.       ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR
  1220.       DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT,
  1221.       CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR
  1222.       INABILITY TO USE SUCH SOFTWARE EVEN IF MARSHALLSOFT COMPUTING, INC.
  1223.       HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO
  1224.       EVENT SHALL MARSHALLSOFT COMPUTING, INC.'S LIABILITY FOR ANY SUCH
  1225.       DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE
  1226.       SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE
  1227.       SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  1228.       SOFTWARE.
  1229.  
  1230.       Some states do not allow the exclusion of the limit of liability for
  1231.       consequential or incidental damages, so the above limitation may not
  1232.       apply to you.
  1233.  
  1234.       This agreement shall be governed by the laws of the State of Alabama
  1235.       and shall inure to the benefit of MarshallSoft Computing, Inc.  and
  1236.       any successors, administrators, heirs and assigns.  Any action or
  1237.       proceeding brought by either party against the other arising out of
  1238.       or related to this agreement shall be brought only in a STATE or
  1239.       FEDERAL COURT of competent jurisdiction located in Madison County,
  1240.       Alabama. The parties hereby consent to in personam jurisdiction of
  1241.       said courts.
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.      WSC4C Users Manual                                        Page 21
  1261.  
  1262.       10.0 Summary
  1263.  
  1264.       10.1 Revision History
  1265.  
  1266.       Version 1.0: 9 September, 1996.
  1267.  
  1268.           o  The initial release of WSC4C.
  1269.  
  1270.       Version 2.0: 25 January, 1997.
  1271.  
  1272.           o  Includes Win32 libraries [Microsoft, Borland, Watcom].
  1273.           o  Added XMODEM & YMODEM DLL (XYDRIVER.DLL).
  1274.           o  Added TERM example program.
  1275.  
  1276.       Version 2.1: 2 June, 1997.
  1277.  
  1278.           o  Added ANSI terminal emulator support.
  1279.           o  Added "expires" option to SioInfo(). [SHAREWARE ONLY].
  1280.           o  Added SioRead function.
  1281.           o  Added Borland C Builder example program.
  1282.  
  1283.       10.2 WSC Function Summary
  1284.  
  1285.       Refer to the WSC4C Reference Manual (WSC4C_R.TXT) for detailed
  1286.       information on the communications and support functions.  A one line
  1287.       summary of each function follows:
  1288.  
  1289.       +-------------+-----------------------------------------------------+
  1290.       |  SioBaud    |  Sets the baud rate of the selected port.           |
  1291.       |  SioBrkSig  |  Asserts, cancels, or detects BREAK signal.         |
  1292.       |  SioCTS     |  Reads the Clear to Send (CTS) modem status bit.    |
  1293.       |  SioDCD     |  Reads the Data Carrier Detect (DCD) modem status.  |
  1294.       |  SioDone    |  Terminates further serial processing.              |
  1295.       |  SioDSR     |  Reads the Data Set Ready (DSR) modem status bit.   |
  1296.       |  SioDTR     |  Set, clear, or read the Data Terminal Ready (DTR). |
  1297.       |  SioFlow    |  Enables / disables hardware flow control.          |
  1298.       |  SioGetc    |  Reads the next character from the serial line.     |
  1299.       |  SioGets    |  Receives a string of characters.                   |
  1300.       |  SioInfo    |  Returns information such as library version.       |
  1301.       |  SioParms   |  Sets parity, stop bits, and word length.           |
  1302.       |  SioPutc    |  Transmit a character over a serial line.           |
  1303.       |  SioPuts    |  Transmits a string of characters.                  |
  1304.       |  SioRead    |  Reads any UART register.                           |
  1305.       |  SioReset   |  Initialize a serial port for processing.           |
  1306.       |  SioRI      |  Reads the Ring Indicator (RI) modem status bit.    |
  1307.       |  SioRTS     |  Sets, clears, or reads the Request to Send (RTS).  |
  1308.       |  SioRxClear |  Clears the receive buffer.                         |
  1309.       |  SioRxQue   |  Returns the number of characters in the RX queue.  |
  1310.       |  SioStatus  |  Returns the serial port line status.               |
  1311.       |  SioTxClear |  Clears the transmit buffer.                        |
  1312.       |  SioTxQue   |  Returns the number of characters in the TX queue.  |
  1313.       |  SioUnGetc  |  "Ungets" (puts back) a specified character.        |
  1314.       +-------------+-----------------------------------------------------+
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.      WSC4C Users Manual                                        Page 22
  1321.  
  1322.       10.3 Further Reading
  1323.  
  1324.  
  1325.       The best way to learn about serial communications is to read a good
  1326.       book on the subject. Several good texts are available.  Two that I
  1327.       like are:
  1328.  
  1329.       (1) C Programmer's Guide to Serial Communications by Joe Campbell
  1330.       (SAMS) (2) Mastering Serial Communications by Peter Gofton (SYBEX).
  1331.  
  1332.       You may also want to get a copy of one of our communications products
  1333.       which talks to the hardware directly.  They include more hardware
  1334.       specific documentation.
  1335.  
  1336.       11.0 Other MarshallSoft Computing Products
  1337.  
  1338.       Several shareware products are available from MarshallSoft Computing.
  1339.  
  1340.       11.1 The Personal Communications Library for Windows (C/C++)
  1341.  
  1342.       The Personal Communications Library for Windows (PCL4W) is a Windows
  1343.       based [Win16] asynchronous communications library designed for
  1344.       software developers programming in C/C++.  Unlike WSC4C, PCL4W
  1345.       interfaces to the serial port hardware directly.  PCL4W also supports
  1346.       multiport boards such as those made by DigiBoard and BOCA.
  1347.  
  1348.       The Personal Communications Library for Windows (PCL4W) is available
  1349.       for $75 plus $5 S&H ($10 S&H overseas).
  1350.  
  1351.       11.2 The Personal Communications Library for C/C++ / DOS
  1352.  
  1353.       PCL4C is similar to PCL4W except that it is designed for DOS.
  1354.       Includes support for both 16-bit and 32-bit protected mode.
  1355.  
  1356.       11.3 Libraries for Other Languages
  1357.  
  1358.       We have communications libraries for C/C++, Turbo Pascal, Visual
  1359.       Basic, and PowerBASIC. Check our BBS or WEB site.
  1360.  
  1361.        PCL4C  : C/C++, DOS [include 16-bit & 32-bit protected mode].
  1362.        PCL4P  : Turbo Pascal, DOS [includes 16-bit protected mode].
  1363.        PCL4VB : Visual Basic, DOS.
  1364.        PCL4PB : Power Basic, DOS.
  1365.  
  1366.         PCL4W : C/C++, Windows 3.1 & Win 95, talks to hardware directly.
  1367.        PCLVBW : Visual Basic, Win 3.1 & Win 95, talks to hardware directly.
  1368.  
  1369.         WSC4C : C/C++, Win 3.1, Win 95, Win NT. Uses Windows API.
  1370.        WSC4VB : Visual Basic, Win 3.1, Win 95, Win NT. Uses Windows API.
  1371.         WSC4D : Borland DELPHI, Win 3.1, Win 95, Win NT. Uses Windows API.
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.      WSC4C Users Manual                                        Page 23
  1381.  
  1382.